<template>
  <RecursionTable title="放射工作人员职业性外照射监测人数分布表" :requestMethod="populationDistribution" :notSum="['year']">
    <template #print="{dataList}">
      <thead>
        <tr>
          <td rowspan="2" align="center">职业类别</td>
          <td rowspan="2" align="center">年份</td>
          <td colspan="9" align="center">在下列有效剂量(mSv) 区间内的检测人数<div>人</div></td>
          <td rowspan="2" align="center">
            <div>应监测人员总数<i>$N_0$</i></div>
            <div>人</div>
          </td>
          <td rowspan="2" align="center">
            <div>受监测人员总数<i>$N_m$</i></div>
            <div>人</div>
          </td>
          <td rowspan="2" align="center">
            <div>年集体有效剂量<i>$N_m$</i></div>
            <div>人·Sv</div>
          </td>
        </tr>
        <tr>
          <td align="center">&lt;MDL</td>
          <td align="center">MDL~</td>
          <td align="center">1.0~</td>
          <td align="center">5.0~</td>
          <td align="center">10.0~</td>
          <td align="center">15.0~</td>
          <td align="center">20.0~</td>
          <td align="center">30.0~</td>
          <td align="center">≥50.0</td>
        </tr>
      </thead>
      <tr v-for="(item,index) in dataList" :key="index">
        <td align="center"><dict-tag :value="item.occupationalClassification" :options = "dict.type.occupational_classification"></dict-tag></td>
        <td align="center">{{item.year}}</td>
        <td align="center">{{item.lessMDl}}</td>
        <td align="center">{{item.mdlOne}}</td>
        <td align="center">{{item.oneFive}}</td>
        <td align="center">{{item.fiveTen}}</td>
        <td align="center">{{item.tenFifteen}}</td>
        <td align="center">{{item.fifteenTwenty}}</td>
        <td align="center">{{item.twentyThirty}}</td>
        <td align="center">{{item.thirtyFifty}}</td>
        <td align="center">{{item.greaterFifty}}</td>
        <td align="center">{{item.shouldMonitorNumber}}</td>
        <td align="center">{{item.acceptMonitorNumber}}</td>
        <td align="center">{{item.collectiveEffectiveDose}}</td>
      </tr>
    </template>
    <template>
      <el-table-column label="职业类别" align="center" prop="occupationalClassification" :show-overflow-tooltip="true">
        <template slot-scope="scope">
          <dict-tag :value="scope.row.occupationalClassification" :options = "dict.type.occupational_classification">
          </dict-tag>
        </template>
      </el-table-column>
      <el-table-column label="年份" align="center" prop="year" />
      <el-table-column align="center">
        <template slot="header">
          <div>在下列有效剂量(mSv) 区间内的检测人数</div>
          <div>人</div>
        </template>
        <el-table-column label="<MDL" align="center" prop="lessMDl" />
        <el-table-column label="MDL~" align="center" prop="mdlOne" />
        <el-table-column label="1.0~" align="center" prop="oneFive" />
        <el-table-column label="5.0~" align="center" prop="fiveTen" />
        <el-table-column label="10.0~" align="center" prop="tenFifteen" />
        <el-table-column label="15.0~" align="center" prop="fifteenTwenty" />
        <el-table-column label="20.0~" align="center" prop="twentyThirty" />
        <el-table-column label="30.0~" align="center" prop="thirtyFifty" />
        <el-table-column label="≥50.0" align="center" prop="greaterFifty" />
      </el-table-column>
      <el-table-column  align="center" prop="shouldMonitorNumber">
        <template slot="header">
          <div>应监测人员总数<i>$N_0$</i></div>
          <div>人</div>
        </template>
      </el-table-column>
      <el-table-column  align="center" prop="acceptMonitorNumber">
        <template #header="row">
          <div>受监测人员总数<i>$N_m$</i></div>
          <div>人</div>
        </template>
      </el-table-column>
      <el-table-column  align="center" prop="collectiveEffectiveDose">
        <template slot="header">
          <div>年集体有效剂量<i>$N_m$</i></div>
          <div>人·Sv</div>
        </template>
      </el-table-column>
    </template>
  </RecursionTable>
</template>

<script>
  import { populationDistribution } from "@/api/form/form";
  import RecursionTable from "./components/RecursionTable";
  export default{
    name:'populationDistribution',
    components:{RecursionTable},
    data(){
      return {
      }
    },
    dicts: ['occupational_classification'],
    methods:{
      populationDistribution(year){
        return populationDistribution(year)
      }
    },
  }
</script>

<style>
</style>
